package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.ThemeDao;
import com.hera.process.config.domain.Theme;
import com.hera.process.config.service.ThemeService;

@Service("themeservice")
public class ThemeServiceImpl implements ThemeService {

	static final Logger logger = Logger.getLogger(ThemeServiceImpl.class);
	
	@Autowired
	private ThemeDao themedao;
	
	@Override
	public Theme findById(Long id) {
		
		return themedao.findOne(id);
	}

	@Override
	public void update(Theme entity) {
		
		themedao.save(entity);
	}

	@Override
	public void save(Theme entity) {
		
		themedao.save(entity);
	}

	@Override
	public void delete(Theme entity) {
		
		themedao.delete(entity);
	}

	@Override
	public List<Theme> findAll() {
		
		return themedao.findAll();
	}

	@Override
	public List<Theme> findAll(FiltroDTO filtroDTO) {
		
		return themedao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
